<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #chart{
            height: 400px;
            width: 600px;
            border: 1px solid #e8e8e8;
            border-radius: 4px;
            padding: 30px;
            float: left;
        }
        #jilu{
            height: 400px;
            width: 500px;
            border: 1px solid #e8e8e8;
            border-radius: 4px;
            padding: 30px;
            float: right;
        }
    </style>
</head>
<body>
<div class="container">
    <div id="chart" class="col-lg-6 col-sm-12"></div>
    <div id="jilu" class="col-lg-6 col-sm-12"></div>
</div>
    <script src="../js/echarts.min.js"></script>
    <script>
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('chart'));
        var jiluChart = echarts.init(document.getElementById('jilu'));
        // 指定图表的配置项和数据
        var option = {
            title: {
                text: '地区分布'
            },
            tooltip: {},
            legend: {
                data:['地区数','发展数']
            },
            xAxis: {
                data: ["成都市","绵阳市","雅安市","乐山市","内江市"]
            },
            yAxis: {},
            series: [{
                name: '地区数',
                type: 'line',
                data: [25, 20, 6, 8, 10, 11]
                },
                {
                name: '发展数',
                type: 'line',
                data: [15, 10, 2, 5, 2, 9]
                }
            ]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);


        //记录
        var jiluoption = {
                title: {
                    text: '访问记录',
                    left: 'center'
                },
                tooltip: {
                    trigger: 'item',
                    formatter: '{a} <br/>{b} : {c} ({d}%)'
                },
                legend: {
                    orient: 'vertical',
                    left: 'left',
                    data: ['行政部', '人事部', '市场部', '财政部', '教学部']
                },
                series: [
                    {
                        name: '访问来源',
                        type: 'pie',
                        radius: '55%',
                        center: ['50%', '60%'],
                        data: [
                            { value: 335, name: '行政部' },
                            { value: 310, name: '教学部' },
                            { value: 234, name: '财政部' },
                            { value: 135, name: '人事部' },
                            { value: 1548, name: '市场部' }
                        ],
                        emphasis: {
                            itemStyle: {
                                shadowBlur: 10,
                                shadowOffsetX: 0,
                                shadowColor: 'rgba(0, 0, 0, 0.5)'
                            }
                        }
                    }
                ]
            };
            jiluChart.setOption(jiluoption);
    </script>
</body>
</html>